Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rdlc.rdl
Interface Expression

All Known Subinterfaces:
  ChannelModel, Declaration, DynRoot, Field, Field, Map, Message, Platform, Type, Unit

All Known Implementing Classes:
  AttributeField, ChannelModel_FIFOPipe, ChannelModel_Indirect, Class, ClassInstance, ClassMethod, ClassTypeArgument, Declaration_Indirect, Declaration_Named, DynRoot_Indirect, DynRoot_Standard, Field_Base, Field_Named, FileInclude, FileInclude, Instance, Instance_Base, LibraryClass, LibraryFile, LibraryFile, LibraryModule, Map_Indirect, Map_Standard, MapEntry, MapInstance, MapLink, MapPort, MapUnit, Message_Event, Message_Indirect, Message_Simple, Message_Struct, Message_Union, Module, ModuleInstance_Indirect, ModuleInstance_Standard, ModuleLogic, ModuleMux, ModuleParameter, ModuleParameterGroup, ModuleWire, ModuleWireGroup, Namespace, Platform_Indirect, Platform_Standard, PlatformInstance, PlatformLink, PlatformPort, PluginField, Statement, Statement_Block, Statement_Decl, Statement_Expr, Statement_Finally, Statement_If, Statement_Set, Statement_Special, Statement_Try, Statement_While, Type_Argument, Type_Base, Type_Reference, Type_Root, Type_Simple, Unit_Indirect, Unit_Standard, UnitChannel, UnitExternal, UnitInstance, UnitPort, Variable

    public interface Expression

The expression interface encapsulates all of the functionality which is specific to an RDL expression. Nearly every class in the `rdlc.rdl` package should inherit from this.

Version:
  $Revision: 1.13 $
Author:
  Greg Gibeling

Nested Class Summary
`static class` | `Expression.Phase` Enumeration of the phases of resolution.

Method Summary
`void` | `getRequirements(CatalogSet<Identifier<Declaration>> requirements)` Generate a list of the declarations upon which this one relies.
`void` | `resolve(java.util.HashSet<Declaration> markSet, Log errorLog, Expression.Phase phase)` Bind objects to identifiers and then attempt to resolve all identifiers to get actual objects.
`void` | `setNamespace(Namespace _namespace)` Set the namespace of an expression after construction.
`boolean` | `typeMatch(Expression e)` Check if the expression given as an argument matches the type of this expression.

Method Detail

### setNamespace

    void setNamespace(Namespace _namespace)

  Set the namespace of an expression after construction. This is used during parsing since the actual namespace an expression is being declared in, is not known until we go back up the parse tree. Thus expressions are created without regard to a namespace, and are told what namespace they are in later.

  Parameters:
    `_namespace` - The namespace this expression is in.

### resolve

    void resolve(java.util.HashSet<Declaration> markSet,
                 Log errorLog,
                 Expression.Phase phase)

  Bind objects to identifiers and then attempt to resolve all identifiers to get actual objects. This method should be called twice on both the static and dynamic hierarchies of interest, the first time with `force = false` and the second time `force = true`. Plugins should be run between the two calls allowing them access to as much of the resovled object space as possible, into which more objects can be added. This method is responsible for binding identifiers to objects, copying instance trees and checking for circular declaration references. In order to facilitate this, each invocation must supply a complete list of all declarations on which it depends (including itself) to the methods it invokes. The caller must then simply make sure it is not a member of that set, add itself to a COPY and continue. Notice that the copy semantics are particularaly important given Java's call-by-reference convention.

  Parameters:
    `markSet` - Complete hash set of declarations on which the caller depends (including itself).
    `errorLog` - Log of errors to be reported to the user.
    `phase` - The phase of resolution to perform.

### typeMatch

    boolean typeMatch(Expression e)

  Check if the expression given as an argument matches the type of this expression. This is the heart of the RDL type matching routines. RDL supports a named type system, meaning that two seemingly identical types which have none the less been given different names (and do not reference each other in their type declaration) are considered different. This facilitates hardware type checking, where it is often necessary to differentiate between an ASCII character and an 8 bit integer.

  Parameters:
    `e` - The expression to check this one against.
  Returns:
    `true` if these two expressions match in type.

### getRequirements

    void getRequirements(CatalogSet<Identifier<Declaration>> requirements)

  Generate a list of the declarations upon which this one relies. This includes all the namespaces in which this declaration is bound, and all of the declarations referenced by this declaration. Used for pruning the amount of work done during output.

  Parameters:
    `requirements` - A list to which this will add the declarations upon which this one relies.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD